package Underworld_Survival;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

abstract class Equipment extends Item{
    private boolean isEquipped=false;
    protected final List<EquipmentSpecialEffect> specialEffect=new ArrayList<>();//防具特殊效果加成，可能不止一个

    public Equipment() {}
    public Equipment(String name, String introduction, String itemEffect, CurrencyType purchaseCurrency,
                     int priceOfPurchase, int priceOfSelling) {
        super(name,introduction,itemEffect,purchaseCurrency,priceOfPurchase,priceOfSelling);
    }

    // 添加特殊效果的方法
    public void addSpecialEffect(EquipmentSpecialEffect effect) {specialEffect.add(effect);}
    // 获取所有效果
    public List<EquipmentSpecialEffect> getSpecialEffect() {return Collections.unmodifiableList(specialEffect);}

    public boolean isIsEquipped() {return isEquipped;}
    public void setIsEquipped(boolean isEquipped) {this.isEquipped = isEquipped;}

}
